﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Dispatch.aspx.cs" Inherits="WMS6.Web.TransportManagement.Dispatch" meta:resourcekey="Page" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Dispatch</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />

    <script src="../Js/jquery.js" type="text/javascript"></script>

    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script>

    <script src="../Js/util.js" id="js" type="text/javascript"></script>

    <script src="../Js/InitPage.js" type="text/javascript"></script>

    <script src="../Js/Verification.js" type="text/javascript"></script>

    <script src="../Js/checkbox.js" type="text/javascript"></script>

    <script type="text/javascript">
        //初始化页面
        window.onload = function(){
            initEditNewPage();
        }
        
        //弹出窗口选择实际车辆
        function SelectActualEquipment(obj1, obj2) {
            var rtnValue = popModalWindow('../Configuration/TransportEquipmentQuery.aspx?action=' + escape(obj1.id.toString()) + '&CarrierID=' + escape(obj2), 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById(obj1.id.toString()).focus();
                document.getElementById(obj1.id.toString()).value = rtnValue;
                __doPostBack("txtActualEquipment_TextChanged","");
            }
        }
        
        //弹出窗口选择实际车型
        function SelectActualEquipmentType(obj1, obj2) {
            var rtnValue = popModalWindow('../Configuration/EquipmentTypeQuery.aspx?action=' + escape(obj1.id.toString()) + '&CarrierID=' + escape(obj2), 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById(obj1.id.toString()).focus();
                document.getElementById(obj1.id.toString()).value = rtnValue;
            }
        }
        
        //弹出窗口选择司机
        function SelectDriver(obj1, obj2) {
            var rtnValue = popModalWindow('../Configuration/DriverQuery.aspx?action=' + escape(obj1.id.toString()) + '&CarrierID=' + escape(obj2), 'dialogWidth=800px;dialogHeight=500px;center=yes;resizable=yes;status=no;');
            if(rtnValue != null && rtnValue.toString() != "")
            {
                document.getElementById(obj1.id.toString()).focus();
                document.getElementById(obj1.id.toString()).value = rtnValue;
                __doPostBack("txtDriver_Change","");
            }
        }
        
        //通过装车数量重新计算剩余数量   ps:qty为原始数量，防止多次输入后，输入0的情况
        function calculatQty(obj1,obj2,qty)
        {
            //剩余数量
            var temp1 = obj1.innerHTML;
            //装车数量
            var temp2 = obj2.value;
            if (!temp2.match(/^[0-9]+$/)) 
            {
               document.getElementById("lblMsg").innerHTML = '<%=GetGlobalMsgResource("F8200_001") %>';
            }
            else if(temp2 ==0 ||  temp2 == "" || temp2.length ==0)
            {
                obj1.innerHTML = qty;
            }
            else
            {
                document.getElementById("lblMsg").innerHTML = "";
                //obj1.innerHTML = qty - temp2;
                if(temp1 - temp2 >=0)
                {
                    obj1.innerHTML = temp1 - temp2;
                }
                else
                {
                    document.getElementById("lblMsg").innerHTML = '<%=GetGlobalMsgResource("F8200_002") %>';
                    return false;
                }
            }
        }
        
        function calculatQtyByLoadQty(deliveryOrderId,lineId,OrgQty,Qty)
        {
            
        }
        
        function setActualEquipmentRowIndex(rowIndex)
        {
            document.getElementById("hdnRowIndex").value = rowIndex;
        }
    </script>

</head>
<body>
    <form id="F8021" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div id="div_top">
            <table>
                <tr>
                    <td valign="bottom">
                        <asp:Label ID="lblOwner" runat="server" CssClass="label_header" Text="计划调度" 
                            meta:resourcekey="lblOwner"></asp:Label>
                    </td>
                    <td>
                        <asp:Button ID="btnGoBack" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnGoBack%>" Enabled="False"
                            CausesValidation="False" OnClick="btnGoBack_Click" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnSave" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnSave%>" Enabled="False"
                            AccessKey="s" OnClick="btnSave_Click" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnConfirm" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnConfirm%>" 
                            OnClick="btnConfirm_Click"  />
                    </td>
                </tr>
            </table>
        </div>
        <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                <div>
                    <asp:Label ID="lblMsg" runat="server" CssClass="label_message" 
                        meta:resourcekey="lblMsg"></asp:Label>
                </div>
                <div id="div_content" style="width: 98%; height: auto; overflow: hidden;">
                    <div id="con_one_1" style="display: block; width: 100%;">
                        <table style="display: block; margin-left: 10px; margin-top: 10px;">
                            <tr>
                                <td style="width: 180px;">
                                    <asp:Label ID="lblDispatchID" runat="server" CssClass="label" Text="调度单号" 
                                        meta:resourcekey="lblDispatchID"></asp:Label>
                                </td>
                                <td style="width: 180px;">
                                    <asp:Label ID="lbl" runat="server" CssClass="label" Text="计划调度指令" 
                                        meta:resourcekey="lbl"></asp:Label>
                                </td>
                                <td style="width: 180px;">
                                    <asp:Label ID="lblTransportType" runat="server" CssClass="label" Text="计划运输方式" 
                                        meta:resourcekey="lblTransportType"></asp:Label>
                                </td>
                                <td  style="width: 180px;">
                                    <asp:Label ID="lblStatus" runat="server" CssClass="label" Text="状态" 
                                        meta:resourcekey="lblStatus"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtDispatchID" runat="server" CssClass="textbox"   Enabled="false"
                                        meta:resourcekey="txtDispatchID"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtShipmentCommand" runat="server" CssClass="textbox" 
                                        meta:resourcekey="txtShipmentCommand"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlTransportType" runat="server" 
                                        CssClass="mediumselectbox" meta:resourcekey="ddlTransportType">
                                    </asp:DropDownList>
                                </td>
                               <td>
                                    <asp:DropDownList ID="ddlStatus" runat="server" CssClass="mediumselectbox" 
                                        Enabled="False" meta:resourcekey="ddlStatus">
                                        <asp:ListItem Text="新建" Value="New" meta:resourcekey="New"></asp:ListItem>
                                        <asp:ListItem Text="完成" Value="Completed" meta:resourcekey="Completed"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                        <div style="height: auto; margin: 10px 2px 10px 10px;">
                            <div style="overflow: auto; width: 65%; float: left; display: block; height: 240px;
                                border: 1px solid #c0c0c0; padding: 1px;">
                                <asp:GridView ID="gvDeliveryOrderDetail" runat="server"  AutoGenerateColumns="False"
                                    Width="1500px" CssClass="gridview" DataKeyNames="DELIVERY_ORDER_ID,LINE_ID,OWNER_ID,ResQty,TRANSFER_TYPE,PACK_ID,TOTAL_WEIGHT,DELIVERY_ORDER_TYPE,SKU_ID,ORIGINAL_QTY"
                                    OnRowDataBound="gvDeliveryOrderDetail_RowDataBound" 
                                    meta:resourcekey="gvDeliveryOrderDetail">
                                    <FooterStyle CssClass="GridViewFooterStyle" />
                                    <RowStyle CssClass="GridViewRowStyle" />
                                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                                    <PagerStyle CssClass="GridViewPageStyle" />
                                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                    <Columns>
                                        <asp:BoundField HeaderText="序号" FooterText="序号" 
                                            meta:resourcekey="BoundField">
                                            <ItemStyle CssClass="GridViewRowWidth_40" />
                                        </asp:BoundField>
                                        <asp:TemplateField meta:resourcekey="TemplateField">
                                            <HeaderTemplate>
                                                <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvDeliveryOrderDetail');"
                                                    meta:resourcekey="CheckBox1" />
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <asp:CheckBox ID="chbSelect" runat="server" meta:resourceKey="chbSelect" />
                                            </ItemTemplate>
                                            <FooterTemplate>
                                                <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAll(this,'gvDeliveryOrderDetail');"
                                                    meta:resourceKey="CheckBox2" />
                                            </FooterTemplate>
                                            <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                            <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="DELIVERY_ORDER_ID" HeaderText="运单号" FooterText="运单号" 
                                            SortExpression="DELIVERY_ORDER_ID" meta:resourcekey="DELIVERY_ORDER_ID">
                                            <ItemStyle CssClass="GridViewRowWidth_150" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="EXTERN_ORDER_ID" HeaderText="订单号" FooterText="订单号" 
                                            SortExpression="EXTERN_ORDER_ID" meta:resourcekey="EXTERN_ORDER_ID">
                                            <ItemStyle CssClass="GridViewRowWidth_150" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="LINE_ID" HeaderText="行号" FooterText="行号" 
                                            SortExpression="LINE_ID" meta:resourcekey="BoundField3">
                                            <ItemStyle CssClass="GridViewRowWidth_50" />
                                        </asp:BoundField>
                                        <asp:BoundField DataField="SKU_ID" HeaderText="货品" FooterText="货品" 
                                            SortExpression="SKU_ID" meta:resourcekey="SKU_ID">
                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                        </asp:BoundField>
                                        <asp:TemplateField FooterText="数量" HeaderText="数量" 
                                            SortExpression="ORIGINAL_QTY" meta:resourcekey="ORIGINAL_QTY">
                                            <ItemTemplate>
                                                <asp:Label ID="lblRiginalQty" runat="server" 
                                                    Text='<%# GetPreferenceDigit(Eval("ORIGINAL_QTY").ToString()) %>' 
                                                    meta:resourcekey="lblRiginalQty"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_50" />
                                        </asp:TemplateField>
                                        <asp:TemplateField FooterText="剩余数量" HeaderText="剩余数量" SortExpression="ResQty" >
                                            <ItemTemplate>
                                                <asp:Label ID="lblResQyt" runat="server" 
                                                    Text='<%# GetPreferenceDigit(Eval("ResQty").ToString()) %>' 
                                                    meta:resourcekey="lblResQyt"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                        </asp:TemplateField>
                                        <asp:TemplateField FooterText="装车数量" HeaderText="装车数量" SortExpression="ResQty" 
                                            meta:resourcekey="ResQty">
                                            <ItemTemplate>
                                                <asp:TextBox ID="txtLoadingQty" runat="server" CssClass="textbox" Width="80px" 
                                                    Text='<%# GetPreferenceDigit(Eval("ResQty").ToString()) %>' 
                                                    meta:resourcekey="txtLoadingQty"></asp:TextBox>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                        </asp:TemplateField>
                                        <asp:BoundField DataField="START_LOC_ADDR" HeaderText="提货地址" FooterText="提货地址" 
                                            SortExpression="START_LOC_ADDR" meta:resourcekey="START_LOC_ADDR">
                                            <ItemStyle CssClass="GridViewRowWidth_200" />
                                        </asp:BoundField>
                                        <asp:TemplateField FooterText="提货时间" HeaderText="提货时间" 
                                            SortExpression="REQUESTED_SHIP_DATE" meta:resourcekey="REQUESTED_SHIP_DATE">
                                            <ItemTemplate>
                                                <asp:Label ID="lblRequestedShipDate" runat="server" 
                                                    Text='<%# GetPreferenceShortDate(Eval("REQUESTED_SHIP_DATE").ToString()) %>' 
                                                    meta:resourcekey="lblRequestedShipDate"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_150" />
                                        </asp:TemplateField>
                                        <asp:TemplateField FooterText="要求到货时间" HeaderText="要求到货时间" 
                                            SortExpression="EXPECT_ARRIVAL_DATE" meta:resourcekey="EXPECT_ARRIVAL_DATE">
                                            <ItemTemplate>
                                                <asp:Label ID="lblExpectArrivalDate" runat="server" 
                                                    Text='<%# GetPreferenceShortDate(Eval("EXPECT_ARRIVAL_DATE").ToString()) %>' 
                                                    meta:resourcekey="lblExpectArrivalDate"></asp:Label>
                                            </ItemTemplate>
                                            <ItemStyle CssClass="GridViewRowWidth_150" />
                                        </asp:TemplateField>
                                    </Columns>
                                </asp:GridView>
                            </div>
                            <div style="margin-left: 10px; overflow-x: auto; width: 33%; float: left; height: 240px;
                                border: 1px solid #c0c0c0;">
                                <table width="100%" cellspacing="0" style="display: block;">
                                    <tr>
                                        <td>
                                            <asp:RadioButtonList ID="radbutList" runat="server" 
                                                RepeatDirection="Horizontal" meta:resourcekey="radbutList">
                                                <asp:ListItem Text="车辆" Value="0" Selected="True" 
                                                    meta:resourcekey="ListItemResource3"></asp:ListItem>
                                                <asp:ListItem Text="承运商" Value="1" meta:resourcekey="ListItemResource4"></asp:ListItem>
                                                <asp:ListItem Text="车型" Value="2" meta:resourcekey="ListItemResource5"></asp:ListItem>
                                            </asp:RadioButtonList>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlEquipmentType" runat="server" CssClass="selectbox" 
                                                meta:resourcekey="ddlEquipmentType">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <div>
                                                <asp:GridView ID="gvEquipment" runat="server"  AutoGenerateColumns="False" AllowSorting="True"
                                                    CssClass="gridview" DataKeyNames="TRANSPORT_EQUIPMENT_ID,EQUIPMENT_TYPE_ID,CARRIER_ID,STATUS"
                                                    Width="600px" OnRowDataBound="gvEquipment_RowDataBound" 
                                                    onsorting="gvEquipment_Sorting" meta:resourcekey="gvEquipment">
                                                    <FooterStyle CssClass="GridViewFooterStyle" />
                                                    <RowStyle CssClass="GridViewRowStyle" />
                                                    <HeaderStyle CssClass="GridViewHeaderStyle" />
                                                    <PagerStyle CssClass="GridViewPageStyle" />
                                                    <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                                    <Columns>
                                                        <asp:BoundField HeaderText="序号" FooterText="序号" 
                                                            meta:resourcekey="BoundField7">
                                                            <ItemStyle CssClass="GridViewRowWidth_40" />
                                                        </asp:BoundField>
                                                        <asp:TemplateField meta:resourcekey="TemplateField">
                                                            <HeaderTemplate>
                                                                <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvEquipment');"
                                                                    meta:resourcekey="CheckBox1" />
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="chbSelect" runat="server" meta:resourceKey="chbSelect" />
                                                            </ItemTemplate>
                                                            <FooterTemplate>
                                                                <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvEquipment');"
                                                                    meta:resourceKey="CheckBox2" />
                                                            </FooterTemplate>
                                                            <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                            <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="TRANSPORT_EQUIPMENT_ID" HeaderText="车牌号" FooterText="车牌号"
                                                            SortExpression="TRANSPORT_EQUIPMENT_ID" 
                                                            meta:resourcekey="TRANSPORT_EQUIPMENT_ID">
                                                            <ItemStyle CssClass="GridViewRowWidth_200" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="EQUIPMENT_TYPE_ID" HeaderText="车型" FooterText="车型" 
                                                            SortExpression="EQUIPMENT_TYPE_ID" meta:resourcekey="EQUIPMENT_TYPE_ID">
                                                            <ItemStyle CssClass="GridViewRowWidth_200" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="TE_STATUS" HeaderText="状态" FooterText="状态" 
                                                            SortExpression="TE_STATUS" meta:resourcekey="TE_STATUS">
                                                            <ItemStyle CssClass="GridViewRowWidth_50" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="CARRIER_ID" HeaderText="承运商" FooterText="承运商" 
                                                            SortExpression="CARRIER_ID" meta:resourcekey="CARRIER_ID">
                                                            <ItemStyle CssClass="GridViewRowWidth_100" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                </asp:GridView>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            <div style="width: 100%; float: left; margin: 10px 200px;">
                                <asp:Button ID="btnDistribution" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnDistribution%>" 
                                    OnClick="btnDistribution_Click"  />
                                <asp:Button ID="btnCancel" runat="server" CssClass="button" Text="<%$Resources:ButtonResource,btnCancel%>" 
                                    OnClick="btnCancel_Click" /></div>
                        </div>
                        <div runat="server" id="divBol" style="overflow: auto; width: 98%; height: 300px;
                            float: left; margin-left: 10px; margin-right: 10px; margin-bottom: 10px;">
                            <asp:GridView ID="gvBol" runat="server"  AutoGenerateColumns="False"
                                CssClass="gridview" DataKeyNames="BOLID,PlanEquipment,PlanEquipmentType,DeliveryID,DeliveryLineID,LineID,QTY,PackID,GrossWeight,Cube,TransportType,TransportMode,OWNERID,SkuID"
                                Width="2100px" OnRowDataBound="gvBol_RowDataBound" 
                                meta:resourcekey="gvBol">
                                <FooterStyle CssClass="GridViewFooterStyle" />
                                <RowStyle CssClass="GridViewRowStyle" />
                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                <PagerStyle CssClass="GridViewPageStyle" />
                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                <Columns>
                                    <asp:BoundField HeaderText="序号" FooterText="序号" 
                                        meta:resourcekey="BoundField2">
                                        <ItemStyle CssClass="GridViewRowWidth_40" />
                                    </asp:BoundField>
                                    <asp:TemplateField meta:resourcekey="TemplateField">
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvBol');" meta:resourcekey="CheckBox1" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chbSelect" runat="server" meta:resourceKey="chbSelect" />
                                        </ItemTemplate>
                                        <FooterTemplate>
                                            <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAll(this,'gvBol');" meta:resourceKey="CheckBox2" />
                                        </FooterTemplate>
                                        <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                        <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_40" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="BOLID" HeaderText="装车单号" FooterText="装车单号" 
                                        SortExpression="BOL_ID" meta:resourcekey="BOLID">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PlanEquipment" HeaderText="计划车辆" FooterText="计划车辆" 
                                        SortExpression="PlanEquipment" meta:resourcekey="PlanEquipment">
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:BoundField>
                                    <asp:TemplateField FooterText="实际车辆 *" HeaderText="实际车辆 *" 
                                        SortExpression="ActualEquipment" meta:resourcekey="ActualEquipment">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtActualEquipment" runat="server" CssClass="textbox" Width="100px"
                                                Text='<%# Eval("ActualEquipment").ToString() %>' 
                                                AutoPostBack="True" OnTextChanged="txtActualEquipment_TextChanged" 
                                                meta:resourcekey="txtActualEquipment"></asp:TextBox><asp:Image ID="imgSelectActualEquipment"
                                                    ImageUrl="../Images/icon_find.gif" CssClass="img" runat="server" 
                                                meta:resourcekey="imgSelectActualEquipment" />
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="PlanEquipmentType" HeaderText="计划车型" FooterText="计划车型"
                                        SortExpression="PlanEquipmentType" meta:resourcekey="PlanEquipmentType">
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:BoundField>
                                    <asp:TemplateField FooterText="实际车型 *" HeaderText="实际车型 *" 
                                        SortExpression="ActualEquipmentType" meta:resourcekey="ActualEquipmentType">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtActualEquipmentType" runat="server" CssClass="textbox" Width="100px"
                                                Text='<%# Eval("ActualEquipmentType").ToString() %>' 
                                                meta:resourcekey="txtActualEquipmentType"></asp:TextBox><asp:Image ID="imgSelectActualEquipmentType"
                                                    ImageUrl="../Images/icon_find.gif" CssClass="img" runat="server" 
                                                meta:resourcekey="imgSelectActualEquipmentType" />
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_200" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="司机 *" HeaderText="司机 *" SortExpression="DRIVER" 
                                        meta:resourcekey="DRIVER">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtDriver" runat="server" CssClass="textbox" Width="100px" Text='<%# Eval("DRIVER").ToString() %>'
                                                OnTextChanged="txtDriver_Change" AutoPostBack="True" 
                                                meta:resourcekey="txtDriver"></asp:TextBox><asp:Image ID="imgSelectDriver"
                                                    ImageUrl="../Images/icon_find.gif" CssClass="img" runat="server" 
                                                meta:resourcekey="imgSelectDriver" />
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="承运商" HeaderText="承运商" SortExpression="CARRIER" 
                                        meta:resourcekey="CARRIER">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCarrierID" runat="server" Text='<%# Eval("CARRIER") %>' 
                                                CssClass="label" meta:resourcekey="lblCarrierID"></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:TemplateField FooterText="指定调度" HeaderText="指定调度" 
                                        SortExpression="DispatchedBy" meta:resourcekey="DispatchedBy">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtDispatchedBy" runat="server" CssClass="textbox" Width="80px"
                                                Text='<%# Eval("DispatchedBy") %>' 
                                                meta:resourcekey="txtDispatchedBy"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="DeliveryID" HeaderText="运单号" FooterText="运单号" 
                                        SortExpression="DeliveryID" meta:resourcekey="DeliveryID">
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DeliveryLineID" HeaderText="行号" FooterText="行号" 
                                        SortExpression="LineID" meta:resourcekey="DeliveryLineID">
                                        <ItemStyle CssClass="GridViewRowWidth_50" />
                                    </asp:BoundField>
                                    <asp:TemplateField FooterText="数量" HeaderText="数量" SortExpression="QTY" 
                                        meta:resourcekey="QTY">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtQty" runat="server" CssClass="textbox" Width="80px" 
                                                Text='<%# GetPreferenceDigit(Eval("QTY").ToString()) %>' 
                                                meta:resourcekey="txtQty"></asp:TextBox>
                                        </ItemTemplate>
                                        <ItemStyle CssClass="GridViewRowWidth_50" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="PackID" HeaderText="包装" FooterText="包装" 
                                        SortExpression="PackID" meta:resourcekey="PackID">
                                        <ItemStyle CssClass="GridViewRowWidth_50" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="GrossWeight" HeaderText="重量" FooterText="重量" 
                                        SortExpression="GrossWeight" meta:resourcekey="GrossWeight">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Cube" HeaderText="体积" FooterText="体积" 
                                        SortExpression="Cube" meta:resourcekey="Cube">
                                        <ItemStyle CssClass="GridViewRowWidth_100" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TransportType" HeaderText="计划运输方式" FooterText="计划运输方式"
                                        SortExpression="TransportType" meta:resourcekey="TransportType">
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TransportMode" HeaderText="计划运输类型" FooterText="计划运输类型"
                                        SortExpression="TransportMode" meta:resourcekey="TransportMode">
                                        <ItemStyle CssClass="GridViewRowWidth_150" />
                                    </asp:BoundField>
                                </Columns>
                            </asp:GridView>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <input type="hidden" id="hdnFrom" runat="server" />
        <input type="hidden" id="hdnDeliveryOrderID" runat="server" />
        <input type="hidden" id="hdnActionID" runat="server" />
        <input type="hidden" id="hdnRowIndex" runat="server" />
    </div>
    </form>
</body>
</html>
